package com.ebei.admin.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.ebei.admin.model.entity.SysPark;
import com.ebei.common.util.Query;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface SysParkMapper extends BaseMapper<SysPark> {

    /**
     * 根据参数查询记录
     * @param query
     * @param condition
     * @return
     */
     List<Map<String, Object>> findByParam(Query<Map<String,Object>> query, Map<String, Object> condition);

    /**
     * 根据type和orgId查询 相应园区下的相应子节点
     * @param condition
     * @return
     */
    List<Map<String, Object>> findUnitByType(Map<String, Object> condition);

    /**
     * 根据用户id查询园区
     * @param userId
     * @return
     */
    Map<String,Object> findByUserId(Integer userId);

    /**
     * 查询所有园区
     * @return
     */
    List<Map<String,Object>> findAll();
}
